<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>xj</title>
	</head>
	<body>
		<script>
			var n = prompt("请输入乘阶的数");
			function cs(n){
				if(n == 1){
					return 1;
				}else{
					return n * cs(n-1);
				}
			}
			alert(cs(n));		
		</script>
	</body>
</html>
